<h1>Accesses for <%= @user.username %></h1>

<table>
  <tr>
    <th>List of allowed features</th>
  </tr>

<% for access in @accesses %>
  <tr>
    <td><%=h access.feature %></td>
    
    <td><%= link_to 'Show', user_access_path(@user, access) %></td>
    <td><%= link_to 'Edit', edit_user_access_path(@user, access) %></td>
    <td><%= link_to 'Destroy', user_access_path(@user, access), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New feature', new_user_access_path(@user) %>
<%= link_to 'Back to User', @user %>
